/**
 * 桥型结构危害接口
 */
import base from "../base"; // 导入接口域名列表
import axios from "../../http/axios"; // 导入http中创建的axios实例

const knowledge = {
  //获取结构树
  getTree(params) {
    return axios.get(`${base.baseUrl}/bridge_type/queryBridgeTypeStructureTree`, {params});
  },
  //新增桥型
  addTreeType(params){
    return axios.post(`${base.baseUrl}/bridge_type/addBridgeType`, params);
  },
  //删除桥型
  delTreeType(params){
    return axios.get(`${base.baseUrl}/bridge_type/deleteBridgeTypeById`, {params});
  },
  //修改桥型
  upDateTreeType(params){
    return axios.post(`${base.baseUrl}/bridge_type/updateBridgeType`, params);
  },

  //新增结构部件
  addStructure(params){
    return axios.post(`${base.baseUrl}/bridge_structure/addStructure`, params);
  },
  //删除结构部件
  delStructure(params){
    return axios.get(`${base.baseUrl}/bridge_structure/deleteById`, {params});
  },
  //修改结构部件
  dupDateStructure(params){
    return axios.post(`${base.baseUrl}/bridge_structure/updateStructure`, params);
  },

  //结构部件查病害
  queryDisease(params){
    return axios.get(`${base.baseUrl}/system_disease/queryDiseaseByStructureId`, {params});
  },
  //新增病害
  addOneDisease(params){
    return axios.post(`${base.baseUrl}/system_disease/addSystemDisease`, params);
  },
  //修改病害
  upOneDisease(params){
    return axios.post(`${base.baseUrl}/system_disease/updateSystemDisease`, params);
  },
  //删除病害
  delOneDisease(params){
    return axios.get(`${base.baseUrl}/system_disease/deleteById`, {params});
  },

  //查病害所有标准
  queryAllDisease(params){
    return axios.get(`${base.baseUrl}/system_disease_standard/queryByDiseaseId`, {params});
  },
  //新增病害评定标准
  addDisease(params){
    return axios.post(`${base.baseUrl}/system_disease_standard/add`, params);
  },
  //修改病害评定标准
  upDisease(params){
    return axios.post(`${base.baseUrl}/system_disease_standard/update`, params);
  },
  //删除病害评定标准
  delDisease(params){
    return axios.get(`${base.baseUrl}/system_disease_standard/delete`, {params});
  },

  //查询小修保养
  getList(params){
    return axios.get(`${base.baseUrl}/minor_repair_maintain/queryMinorRepairMaintainList`, {params});
  },
  //新增
  addApi(params){
    return axios.post(`${base.baseUrl}/minor_repair_maintain/addMinorRepairMaintain`, params);
  },
  //修改
  upApi(params){
    return axios.post(`${base.baseUrl}/minor_repair_maintain/updateMinorRepairMaintain`, params);
  },
  //删除
  delApi(params){
    return axios.get(`${base.baseUrl}/minor_repair_maintain/deleteMinorRepairMaintain`, {params});
  },
};

export default knowledge;
